package otherapi;

import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


/**
 * @author 李栋
 * @version 1.0.0
 * @className TypeConvertTest.java
 * @createTime 2021年07月25日 20:24:00
 */
public class TypeConvertTest {

    private static final Logger logger = LoggerFactory.getLogger(TypeConvertTest.class);

    /**
     * 类型转换
     */
    @Test
    public void testOne() {
        double x = 3.14123;
        int a = (int) x;
        float b = (float) x;
        logger.info(a + "   " + b);

        Float z = new Float("3.33");
        logger.info(String.valueOf(z.floatValue()));
    }

}
